/*
 * CDPSRaidBuff.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of JRogueDPS.
 * 
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsinterface;

import raidbuffs.CRaid;
import raidbuffs.CRaid.RaidBuff;

/**
 *
 * @author Giles Millward (Manigra)
 */
public class CDPSRaidBuff {

    // Target debuffs
    private double  m_armorPenMajor;
    private double  m_armorPenMinor;
    private boolean m_bleed;
    private double  m_physicalCrit;
    private boolean m_physicalDamage;
    private double  m_spellCrit;
    private boolean m_spellDamage;
    private boolean m_spellHit;

    // Buffs
    private boolean m_agiStr;
    private boolean m_attackPowerFlat;
    private double  m_attackPowerMult;
    private boolean m_damage;
    private double  m_meleeHaste;
    private double  m_haste;
    private boolean m_draenei;
    private double  m_spellCritBuff;
    private double  m_meleeCritBuff;
    private boolean m_statsFlat;
    private double  m_statsMult;
    private boolean m_health;
    private boolean m_stamina;
    private boolean m_bloodlust;

    public CDPSRaidBuff(CRaid p_raid)
    {
        m_armorPenMajor = (p_raid.getValue(RaidBuff.SUNDER_ARMOR) ||
                          p_raid.getValue(RaidBuff.EXPOSE_ARMOR)) ? 0.20:0.0;
        
        m_armorPenMinor = (p_raid.getValue(RaidBuff.FAERIE_FIRE) ||
                          p_raid.getValue(RaidBuff.STING) ||
                          p_raid.getValue(RaidBuff.COW)) ? 0.05:0.00;

        m_bleed = p_raid.getValue(RaidBuff.MANGLE) |
                              p_raid.getValue(RaidBuff.TRAUMA);

        m_physicalCrit = (p_raid.getValue(RaidBuff.HOTC) ||
                              p_raid.getValue(RaidBuff.MASTER_POISONER) ||
                              p_raid.getValue(RaidBuff.TOTEM_OF_WRATH)) ? 0.03:0.0;

        m_physicalDamage = p_raid.getValue(RaidBuff.SAVAGE_COMBAT) |
                              p_raid.getValue(RaidBuff.BLOOD_FRENZY);

        m_spellCrit = (p_raid.getValue(RaidBuff.IMPROVED_SCORCH) ||
                              p_raid.getValue(RaidBuff.WINTERS_CHILL)) ? 0.02:0.0;

        m_spellDamage = p_raid.getValue(RaidBuff.EBON_PLAGUEBRINGER) |
                              p_raid.getValue(RaidBuff.EARTH_AND_MOON) |
                              p_raid.getValue(RaidBuff.COE);

        m_spellHit = p_raid.getValue(RaidBuff.IMPROVED_FAERIE_FIRE) |
                              p_raid.getValue(RaidBuff.MISERY);

        // Buffs
        m_agiStr = p_raid.getValue(RaidBuff.HORN_OF_WINTER) |
                              p_raid.getValue(RaidBuff.STRENGTH_OF_EARTH);

        m_attackPowerFlat = p_raid.getValue(RaidBuff.BOM) |
                              p_raid.getValue(RaidBuff.BATTLE_SHOUT);

        m_attackPowerMult = (p_raid.getValue(RaidBuff.ABOMINATIONS_MIGHT) ||
                              p_raid.getValue(RaidBuff.TRUESHOT_AURA) ||
                              p_raid.getValue(RaidBuff.UNLEASHED_RAGE)) ? 0.10:0.0;

        m_damage = p_raid.getValue(RaidBuff.FEROCIOUS_INSPIRATION) |
                              p_raid.getValue(RaidBuff.SANCTIFIED_RETRIBUTION);

        m_meleeHaste = (p_raid.getValue(RaidBuff.IMPROVED_ICY_TALONS) ||
                              p_raid.getValue(RaidBuff.WINDFURY_TOTEM)) ? 0.20:0.0;

        m_haste = (p_raid.getValue(RaidBuff.IMPROVED_MOONKIN_FORM) ||
                              p_raid.getValue(RaidBuff.SWIFT_RETRIBUTION)) ? 0.03:0.0;

        m_draenei = p_raid.getValue(RaidBuff.HEROIC_PRESENCE);

        m_spellCritBuff = (p_raid.getValue(RaidBuff.MOONKIN_AURA) ||
                              p_raid.getValue(RaidBuff.ELEMENTAL_OATH)) ? 0.05:0.0;

        m_meleeCritBuff = (p_raid.getValue(RaidBuff.LOTP) ||
                              p_raid.getValue(RaidBuff.RAMPAGE)) ? 0.05:0.0;

        m_statsFlat = p_raid.getValue(RaidBuff.MOTW);

        m_statsMult = (p_raid.getValue(RaidBuff.BOK) == true) ? 0.10:0.00;

        m_health = p_raid.getValue(RaidBuff.BLOOD_PACT) |
                              p_raid.getValue(RaidBuff.COMMANDING_SHOUT);

        m_stamina = p_raid.getValue(RaidBuff.FORTITUDE);

        m_bloodlust = p_raid.getValue(RaidBuff.BLOODLUST);
    }

    /**
     * @return the m_armorPenMajor
     */
    public double getArmorPenMajor() {
        return m_armorPenMajor;
    }

    /**
     * @return the m_armorPenMinor
     */
    public double getArmorPenMinor() {
        return m_armorPenMinor;
    }

    /**
     * @return the m_bleed
     */
    public boolean isBleed() {
        return m_bleed;
    }

    /**
     * @return the m_physicalCrit
     */
    public double getPhysicalCrit() {
        return m_physicalCrit;
    }

    /**
     * @return the m_physicalDamage
     */
    public boolean isPhysicalDamage() {
        return m_physicalDamage;
    }

    /**
     * @return the m_spellCrit
     */
    public double getSpellCrit() {
        return m_spellCrit;
    }

    /**
     * @return the m_spellDamage
     */
    public boolean isSpellDamage() {
        return m_spellDamage;
    }

    /**
     * @return the m_spellHit
     */
    public boolean isSpellHit() {
        return m_spellHit;
    }

    /**
     * @return the m_agiStr
     */
    public boolean isAgiStr() {
        return m_agiStr;
    }

    /**
     * @return the m_attackPowerFlat
     */
    public boolean isAttackPowerFlat() {
        return m_attackPowerFlat;
    }

    /**
     * @return the m_attackPowerMult
     */
    public double getAttackPowerMult() {
        return m_attackPowerMult;
    }

    /**
     * @return the m_damage
     */
    public boolean isDamage() {
        return m_damage;
    }

    /**
     * @return the m_meleeHaste
     */
    public double getMeleeHaste() {
        return m_meleeHaste;
    }

    /**
     * @return the m_haste
     */
    public double getHaste() {
        return m_haste;
    }

    /**
     * @return the m_draenei
     */
    public boolean isDraenei() {
        return m_draenei;
    }

    /**
     * @return the m_spellCritBuff
     */
    public double getSpellCritBuff() {
        return m_spellCritBuff;
    }

    /**
     * @return the m_meleeCritBuff
     */
    public double getMeleeCritBuff() {
        return m_meleeCritBuff;
    }

    /**
     * @return the m_statsFlat
     */
    public boolean isStatsFlat() {
        return m_statsFlat;
    }

    /**
     * @return the m_statsMult
     */
    public double getStatsMult() {
        return m_statsMult;
    }

    /**
     * @return the m_health
     */
    public boolean isHealth() {
        return m_health;
    }

    /**
     * @return the m_stamina
     */
    public boolean isStamina() {
        return m_stamina;
    }

    /**
     * @return the m_bloodlust
     */
    public boolean isBloodlust() {
        return m_bloodlust;
    }

}
